package com.marvels.financial.loan.service.impl;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.financial.loan.service.CollectionReadyInfoSenderService;

@Service
public class CollectionReadyInfoMqSenderImpl implements CollectionReadyInfoSenderService{

	@Autowired
	private AmqpTemplate rabbitTemplate;
	
	@Value("${platform.name.prefix}")
	private String platformNamePrefix;
	
	@Override
	public void send(String object,String content) {
		object = platformNamePrefix + object;
		MarvelsLogUtil.getInstance().info(">>>>>>>>>>collection_ready_information催收需要信息推送,类别:"+object+"内容:"+content);
		this.rabbitTemplate.convertAndSend(object, content);
		MarvelsLogUtil.getInstance().info(">>>>>>>>>>collection_ready_information催收需要信息推送结束");
	}

}
